﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using ERP.DAL;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using Core;

namespace MainApp
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            String connecString = String.Format(@"Server={0};Database={1};User Id={2};Password={3};", "192.168.4.72", "SGERP", "sa", "110");
            //Microsoft.Practices.EnterpriseLibrary.Data.Database db = EnterpriseLibraryContainer.Current.GetInstance<Microsoft.Practices.EnterpriseLibrary.Data.Database>("Test");
            Microsoft.Practices.EnterpriseLibrary.Data.Database db = new SqlDatabase(connecString);
            Host Prov = new Host(db);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new MainForm());
            Application.Run(new LoginForm());
            //new LoginForm().ShowDialog();
        }
    }
}
